package com.xinzhi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinzhi.pojo.Bankaccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BankaccountMapper extends BaseMapper<Bankaccount> {
    /**
     * 根据卡号查询余额
     * @param cardNumber
     * @return
     */
    Bankaccount selectMoney(@Param("card_number") String cardNumber);

    /**
     * 根据手机号查询用户信息
     * @param phone_number
     * @return
     */
    Bankaccount selectBankaccount(String phone_number);

    /**
     * 根据手机号和id查询收款人信息
     * @param phone_number
     * @param id
     * @return
     */

    Boolean selectPayee(@Param("card_number")String phone_number,@Param("id")Integer id);

    /**
     * 根据卡号和卡密码查询用户信息
     * @param card_number
     * @param card_password
     * @return
     */

    Bankaccount selectPassword(@Param("card_number")String card_number,@Param("card_password") String card_password);
}
